import { Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';
import { JwtAuthGuard } from './guard';
import { modules, providers, controllers } from './modules';

@Module({
  imports: [...modules],
  providers: [
    {
      provide: APP_GUARD,
      useClass: JwtAuthGuard,
    },
    ...providers,
  ],
  controllers: [...controllers],
})
export class AppModule {
  constructor() {
    console.log('初始化AppModule');
  }
}
